package com.xumt.hwHMSdemo.ui;

import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;

import com.xumt.hwHMSdemo.Login2;
import com.xumt.hwHMSdemo.R;
import com.xumt.hwHMSdemo.Showaddress;
import com.xumt.hwHMSdemo.individualms;
import com.xumt.hwHMSdemo.updatamember;

public class PersonFragment extends Fragment {

    private String result;
    private String thisusername=individualms.nicheng;
    private String sex=null;
    public View onCreateView(@NonNull LayoutInflater inflater,
                             ViewGroup container, Bundle savedInstanceState) {
        View root = inflater.inflate(R.layout.activity_individualview, container, false);
        TextView textView=(TextView)root.findViewById(R.id.namer);
        textView.setText(Login2.usernamen);
        Intent intent=new Intent(getActivity(), individualms.class);
        Intent intent1=new Intent(getActivity(),Login2.class);
        Intent intent2=new Intent(getActivity(), Showaddress.class);
        Intent intent3=new Intent(getActivity(), updatamember.class);
        ImageButton imageButton=(ImageButton)root.findViewById(R.id.b2);
        imageButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(intent);
            }
        });

        Button button =(Button)root.findViewById(R.id.b5);
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(intent1);
            }
        });
        ImageButton imageButton1=(ImageButton)root.findViewById(R.id.b3);
        imageButton1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(intent2);
            }
        });

        ImageButton imageButton2=(ImageButton)root.findViewById(R.id.b1);
        imageButton2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(intent3);
            }
        });
        return root;
    }



}

